package net.ivpn.core.rest.data.proofs

/*
 IVPN Android app
 https://github.com/ivpn/android-app
 
 Created by Oleksandr Mykhailenko.
 Copyright (c) 2023 IVPN Limited.
 
 This file is part of the IVPN Android app.
 
 The IVPN Android app is free software: you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by the Free
 Software Foundation, either version 3 of the License, or (at your option) any later version.
 
 The IVPN Android app is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 details.
 
 You should have received a copy of the GNU General Public License
 along with the IVPN Android app. If not, see <https://www.gnu.org/licenses/>.
*/

import com.google.gson.annotations.SerializedName

data class LocationResponse(
    @SerializedName("ip_address") val ipAddress : String?,
    @SerializedName("isp") val isp : String?,
    @SerializedName("organization") val organization : String?,
    @SerializedName("country") val country : String?,
    @SerializedName("country_code") val countryCode : String?,
    @SerializedName("city") val city : String?,
    @SerializedName("latitude") val latitude : Double,
    @SerializedName("longitude") val longitude : Double,
    @SerializedName("isIvpnServer") val isIvpnServer : Boolean
) {
    fun getLocation(): String {
        return "$city, $countryCode"
    }
}